<template>about 动态组件的传值-{{ currentName }}</template>

<script>
export default {
  name: 'About',
  //   动态组件的传值
  props: ['currentName'],
  beforeCreate() {
    console.log('About组件beforeCreate')
  },
  created() {
    console.log('About组件created')
  },
  beforeMount() {
    console.log('About组件beforeMount')
  },
  mounted() {
    // keep-alive组件缓存时不会再次调用生命周期
    console.log('About组件mounted')
  },
  beforeUpdate() {
    console.log('About组件beforeUpdate')
  },
  updated() {
    console.log('About组件updated')
  },
  beforeUnmount() {
    console.log('About组件beforeUnmount')
  },
  unmounted() {
    console.log('About组件unmounted')
  },
  activated() {
    // activated和deactivated只有被keep-alive组件包裹时生效
    console.log('About组件activated-keep-alive')
  },
  deactivated() {
    console.log('About组件deactivated-keep-alive')
  },
}
</script>

<style></style>
